package org.sunflower.dogeggstudy.domain.member;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @description:
 * @author: TanJingyu
 * @create: 2021-11-28 17:22
 **/
public interface MembersMapper {

    @Insert("INSERT INTO members (user_name, age, create_time) VALUES(#{userName}, #{age}, #{createTime})")
    Boolean insert(Members members);

    @Select("SELECT * FROM members WHERE create_time = #{createTime}")
    List<Members> findAll(@Param("createTime") LocalDateTime createTime);
}
